package com.example.demo.mapper;

import com.example.demo.entity.user.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.sql.Timestamp;
import java.util.List;

@Mapper
public interface UserMapper {

    @Select("SELECT * FROM public.sys_user ORDER BY id ASC ")
    public List<User> findAll();

    @Insert("insert into public.sys_user(name,password,type,create_user,create_time) values (#{name},#{password},#{type},#{createUser},#{createTime})")
    public int addUser(String name, String password, int type, String createUser, Timestamp createTime);
}
